﻿using Models;
using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace Admin.业务界面
{
    public partial class ID对照 : Form
    {
        List<StuGroup> all_group;
        List<Teacher> all_teacher;

        public ID对照()
        {
            InitializeComponent();
        }

        private void ID对照_Load(object sender, EventArgs e)
        {
            BLL.B_Admin b_Group = new BLL.B_Admin();
            BLL.B_Admin b_Teacher = new BLL.B_Admin();

            all_group = b_Group.GetList_S_T();
            all_teacher = b_Teacher.GetList_T();

            dataGridView1.DataSource = all_group;
            dataGridView3.DataSource = all_teacher;
        }

        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }

        private void dataGridView2_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }

        private void dataGridView3_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }

        private void dataGridView1_MouseClick(object sender, MouseEventArgs e)
        {
            if (dataGridView1.Rows.Count == 0)
                return;
            int idx = dataGridView1.CurrentCell.RowIndex;
            BLL.B_Admin b_student = new BLL.B_Admin();
            dataGridView2.DataSource = b_student.GetList_S_G(all_group[idx]);
        }
    }
}
